﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using condortravel.operaciones.common.Log;

namespace condortravel.operaciones.error
{
    public class ExceptionBase : Exception
    {
        public ExceptionBase()
            : base()
        {

        }
        public ExceptionBase(string message)
            : base(message)
        {
            string trace = this.StackTrace;
            LogApp.WriteLog(ELogLevel.ERROR, string.Format("Error:{0} - Trace:{1}", message, trace));
        }
        public ExceptionBase(string message, Exception innerException)
            : base(message, innerException)
        {
            LogApp.WriteLog(ELogLevel.ERROR, string.Format("Error:{0} - Trace:{1}", message, innerException.StackTrace));
        }

    }

}
